import { createRouter, createWebHistory } from 'vue-router';
import { basicRoutes } from './routes';
import routerGuard from './routerGuard';

const router = createRouter({
  history: createWebHistory('/'),
  routes: basicRoutes,
  strict: true,
  scrollBehavior: () => ({ left: 0, top: 0 })
});

export function setupRouter(app) {
  app.use(router);
}

export function setupRouterGuard() {
  routerGuard(router);
}

export default router;
